<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>滚图</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <script type="text/javascript" charset="utf-8" src="${basePath}/js/jquery.js"></script>
    <link href="${basePath}/admin/css/base.css" type="text/css" rel="stylesheet">
    <link type="text/css" href="${basePath}/tools/ueditor/themes/default/css/ueditor.css" rel="stylesheet"/>
    <script type="text/javascript">
	 	var UEDITOR_HOME_URL = "${basePath}/tools/ueditor/";
	</script>
    <link rel="stylesheet" type="text/css" href="${basePath}/css/jquery.datetimepicker.css"/>
    <script type="text/javascript" charset="utf-8" src="${basePath}/js/jquery.datetimepicker.js"></script>
    <script type="text/javascript" charset="utf-8" src="${basePath}/tools/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="${basePath}/tools/ueditor/ueditor.all.min.js"> </script>
    <script type="text/javascript" charset="utf-8" src="${basePath}/tools/ueditor/lang/zh-cn/zh-cn.js"></script>
   	<style type="text/css">
		ul li{list-style:none;height:50px;}
	</style>
</head>
<body>
<p></p>
<div id="container" style="background:#f2ffe3 url(${basePath}/admin/images/main_00.jpg) left top repeat-x;">
<h2><#if game.id??>更新<#else>添加</#if>滚图</h2>&nbsp;&nbsp;
     <form action="${basePath}/admin/game/<#if game.id??>update<#else>save</#if>" method="POST" enctype="multipart/form-data">
      	<input type="hidden" name="game.id" value="${game.id!}"/>
      	<input type="hidden" name="game.create_time" value="<#if game.create_time??>${game.create_time?string('yyyy-MM-dd HH:mm:ss')}<#else></#if>"/>
      	<input type="hidden" name="game.apk_downs" value="${game.apk_downs!0}"/>
      	<input type="hidden" name="game.ios_downs" value="${game.ios_downs!0}"/>
      	<input type="hidden" name="game.click_num" value="${game.click_num!0}"/>
      	<ul>
      		<li>关联CP
      			<select name="game.admin_id" class="select_203">
      					<#list admins as a>
      						<#if game.admin_id?? && game.admin_id == a.id>
      							<option value="${a.id!}" selected="selected">${a.nickname!}</option>
      						<#else>
      							<option value="${a.id!}">${a.nickname!}</option>
      						</#if>
      					</#list>
   				</select>	
				${admin_idError!}
      		</li>
      		<li>关联游戏类型
      			<select name="game.type_id" class="select_203">
   					<#list gametypes as g>
   						<#if game.type_id?? && game.type_id == g.id>
   							<option value="${g.id!}" selected="selected">${g.name!}</option>
   						<#else>
   							<option value="${g.id!}">${g.name!}</option>
   						</#if>
   					</#list>
   				</select>	
				${type_idError!}
      		</li>
        	<li>名称：		<input type="text" class="input_200" name="game.name" value="${game.name!}" />	${nameError!}</li>
        	<li>排序号:	<input type="text" class="input_100" name="game.sort_id" value="${game.sort_id!'-1'}" />	${sort_idError!}</li>
        	<li>价格：		<input type="text" class="input_200" name="game.price" value="${game.href!'0'}" />	${priceError!} 免费游戏默认为：0</li>
        	<li>上架时间：	<input type="text" id="online_time" class="input_200" name="game.online_time" value="<#if game.online_time??>${game.online_time?string('yyyy-MM-dd HH:mm:ss')}<#else></#if>" />	${onilne_timeError!} </li>
        	<li>版本更新时间：<input type="text" id="version_update" class="input_200" name="game.version_update" value="<#if game.version_update??>${game.version_update?string('yyyy-MM-dd HH:mm:ss')}<#else></#if>" />	${version_updateError!} </li>
        	<li>版本号：	<input type="text" class="input_200" name="game.version" value="${game.version!'1.0'}" />	${versionError!} </li>
        	<li>游戏评分：	<input type="text" class="input_200" name="game.grade" value="${game.grade!'8.8'}" />	${gradeError!} </li>
        	<li>
        		icon：	<input type="file" class="input_200" name="icon_path" value="${game.icon_path!}" />
        				<#if game.icon_path??>
        					<a href="${basePath}${game.icon_path!}" target="_blank">查看图片</a>	${icon_pathError!}
        				</#if>
        				<input type="hidden" name="old_icon_path" value="${game.icon_path!}" />
        	</li>
        	<li>
        		logo：	<input type="file" class="input_200" name="image_path" value="${game.image_path!}" />
        				<#if game.image_path??>
        					<a href="${basePath}${game.image_path!}" target="_blank">查看图片</a>	${image_pathError!}
        				</#if>
        				<input type="hidden" name="old_image_path" value="${game.image_path!}" />
        	</li>
        	<li style="height: auto;">简介：
        		<script id="description" type="text/plain" name="game.description" style="width:800px;height:200px;">${game.description!}</script>
        		${descriptionError!}
        	</li>
        	<li style="height: auto;">详情：
        		<script id="detail" type="text/plain" name="game.detail" style="width:800px;height:300px;">${game.detail!}</script>
        		${detailError!}
        	</li><br/><br/>
        	<li>Android上传地址：
        		<input type="text" class="input_300" name="game.android_path" value="${game.android_path!}" />	${android_pathError!}
        	</li>
        	<li>AppStore下载地址：<input type="text" class="input_300" name="game.ios_path" value="${game.ios_path!}" />	${ios_pathError!} </li>
        	<li>IOS越狱ipa上传：<input type="text" class="input_300" name="game.ipa_path" value="${game.ipa_path!}" />	${ipa_pathError!} </li>
        	<li>
  				<input type="reset" class="button_60" value="重置"	/>
  				<input type="submit" class="button_60" value="提交"	/>
        	</li>
           </ul>
      </form>
  </div>
  <script type="text/javascript">
	  $('#online_time').datetimepicker({
			timepicker:true,
			lang:'ch',
			format:'Y-m-d H:i:s'
		});
	  $('#version_update').datetimepicker({
			timepicker:true,
			lang:'ch',
			format:'Y-m-d H:i:s'
		});
	  
	  UE.getEditor('description');
	  UE.getEditor('detail');
  </script>
</body>
</html>